import { AUDIT_STATUS_LIST } from '@/const/type';
export const tableOption = () => {
  return {
    ...window.$crudMixins.tableOptions,
    addBtn: false,
    editBtn: false,
    delBtn: false,
    menuWidth: 100,
    searchLabelWidth: 100,
    viewBtn: false,
    column: [
      {
        label: '审核状态',
        prop: 'examineState',
        type: 'select',
        search: true,
        rules: [
          {
            required: true,
            message: '请选择审核状态',
            trigger: 'blur',
          },
        ],
        dicData: AUDIT_STATUS_LIST,
      },
      {
        label: '姓名',
        search: true,
        prop: 'name',
      },
      {
        type: 'input',
        label: '联系电话',
        prop: 'phone',
        search: true,
        minWidth: 100,
        rules: [
          {
            min: 11,
            max: 11,
            required: true,
            message: '长度在 11 个字符',
            trigger: 'blur',
          },
        ],
      },
      {
        // 性别 : 0 - 未知的性别1 - 男性2 - 女性9 - 未说明的性别
        label: '性别',
        prop: 'sex',
        type: 'select',
        dicData: [
          { label: '未知的性别', value: '0' },
          { label: '男性', value: '1' },
          { label: '女性', value: '2' },
          { label: '未说明的性别', value: '9' },
        ],
      },
      {
        label: '申请时间',
        prop: 'applyTime',
        type: 'datetime',
        minWidth: 100,
        format: 'yyyy-MM-dd HH:mm:ss',
        valueFormat: 'yyyy-MM-dd HH:mm:ss',
        search: true,
        searchRange: true,
      },
      {
        prop: 'examineRemark',
        type: 'textarea',
        label: '审核备注',
        minRows: 7,
        span: 24,
      },
    ],
  };
};
